<% include ../header.ejs %>


<link rel="stylesheet" href="/stylesheets/app/address/address.css">

<header data-am-widget="header" data-am-sticky class="am-header am-header-default" id="appTemplates-Nav">

    <div class="am-header-left am-header-nav">
        <a href='/smtool_project/wxapp/' class="">
            <img class="am-header-icon-custom"
                 src="data:image/svg+xml;charset&#x3D;utf-8,&lt;svg xmlns&#x3D;&quot;http://www.w3.org/2000/svg&quot; viewBox&#x3D;&quot;0 0 12 20&quot;&gt;&lt;path d&#x3D;&quot;M10,0l2,2l-8,8l8,8l-2,2L0,10L10,0z&quot; fill&#x3D;&quot;%23fff&quot;/&gt;&lt;/svg&gt;"
                 alt=""/>
        </a>
    </div>
    <h1 class="am-header-title">
        <a href="#title-link" class="" id="Typeface-whitecolor">通讯录</a>
    </h1>


    <div class="am-header-right am-header-nav">
        <a id="custom-add-button" href="detail?action=add&editable=true">
            <i class="am-header-icon am-icon-plus"></i>
        </a>
    </div>
</header>

<div class="am-g" ng-app="addressbookList" ng-controller="listController">
    <div class="col-lg-12">
        <div class="am-form-group">
            <div class="am-input-group am-input-group-primary search-head">
                <input type="text" ng-model="queryStr" class="am-form-field ">
                <span class="am-input-group-btn">
        <a>
            <button class="am-btn am-btn-primary" type="button" ng-click="query()">
                <span class="am-icon-search"></span>
            </button>
        </a>
      </span>
            </div>
        </div>
    </div>


    <ul class="am-list admin-sidebar-list" id="collapase-nav-1" ng-repeat="data in datas">
            <li class="am-panel" style="background-color: #f5f5f5" ng-if="data.addressbooks.length>0">
                <a data-am-collapse="{parent: '#collapase-nav-1', target: '#{{data.rowId}}'}">
                    <i class="am-icon-users am-margin-left-sm"></i> {{data.name}}
                    <i class="am-fr am-margin-right">{{data.addressbooks.length}}</i>
                </a>
                <ul class="am-list am-collapse admin-sidebar-sub" id="{{data.rowId}}">
                    <li class="am-list-item-desced am-list-item-thumbed" style="padding-left: 25px;padding-right: 25px"
                        ng-repeat="addressbook in data.addressbooks">
                        <div class="am-g">
                            <a class="address-list am-u-sm-11" ng-click="toDetail(addressbook.rowId)"
                               style="margin-bottom: 0;margin-top: 0">
                                <div class="am-list-item-hd am-g am-div-margin ">
                                    <div class="am-u-sm-6">
                                        <h3 class="am-list-item-hd" style="margin-bottom: 0;margin-top: 0">
                                            {{addressbook.name}}</h3>
                                        <small class="am-list-item-hd" style="margin-bottom: 0;margin-top: 0">行业:
                                            {{addressbook.industry}}
                                        </small>
                                    </div>

                                    <div class="am-u-sm-6">
                                        {{addressbook.department != null?addressbook.department.name:""}}
                                        <small class="am-list-item-hd" style="margin-bottom: 0;margin-top: 0">电话:
                                            {{addressbook.phone}}
                                        </small>
                                    </div>
                                </div>
                            </a>
                            <a class="am-u-sm-1 am-icon-phone" href="tel:{{addressbook.phone}}"></a>
                        </div>
                    </li>
                </ul>
            </li>
    </ul>

</div>

<script src="/javascripts/app/addressbook/addressbookIndex.js"></script>
<% include ../footer.ejs %>